#ifndef QCOMMON_H
#define QCOMMON_H
#define G2U(s) ( QTextCodec::codecForName("GBK")->toUnicode(s) )
#define U2G(s) ( QTextCodec::codecForName("GBK")->fromUnicode(s) )
#pragma once
#include <tidy.h>
#include <buffio.h>

struct MemoryStruct {
	char *memory;
	size_t size;
	MemoryStruct()
	{
		memory=NULL;
		size=-1;
	}
};

struct MemoryInfoStruct
{
	char* url;
	uint reserve;
	TidyBuffer tidyBuffer;
	MemoryInfoStruct()
	{
		//url=NULL;
		url=(char*)malloc(200);
		ZeroMemory(url,200);
		reserve=0;
		//tidyBuffer = {0};
		//tidyBuffer={0};
		tidyBufInit(&tidyBuffer);
	}
};
#endif